package interfaces.subpanel.classifier;

import java.awt.Component;
import java.awt.Font;

import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;

public class LabelCellRenderer extends JTextArea implements TableCellRenderer {

	private static final long serialVersionUID = 1L;

	private final DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();

	public LabelCellRenderer() {
		this.renderer.setFont(new Font(Font.SANS_SERIF, 0, 7));
	}

	@Override
	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
		this.renderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
		this.renderer.setFont(new Font(Font.SANS_SERIF, 0, 7));
		setFont(new Font(Font.SANS_SERIF, 0, 7));
		setText(this.renderer.getText());
		setBorder(null);
		return this;
	}

}
